import java.lang.Throwable;
import java.lang.Math;

public class Test10 {
    public static void main(String[] args) {

        Test10 t = new Test10();

        try {
            t.showVolume(-1);
        } catch (Exception e) {

        }
    }

    public static void showVolume(int radius) throws SphereException {
        if (radius > 20 || radius <= 0) {
            throw new SphereException();
        }
        double volume = 4.0 / 3 * Math.PI * Math.pow(radius, 3);

        System.out.println(volume);

    }

}

class SphereException extends Exception {
    public SphereException() {
        System.out.println("半径大于20或小于等于0");
    }
}

